<template>
  <div @click="openDrawer(true, {})">
    <Tooltip title="产品">
      <Icon icon="ant-design:appstore-outlined"/>
    </Tooltip>
    <ServiceDrawer @register="register" />
  </div>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import { Tooltip } from 'ant-design-vue';
  import ServiceDrawer from './ServiceDrawer.vue';
  import Icon from '/@/components/Icon';

  import { useDrawer } from '/@/components/Drawer';

  export default defineComponent({
    name: 'SettingButton',
    components: { ServiceDrawer, Icon, Tooltip },
    setup() {
      const [register, { openDrawer }] = useDrawer();

      return {
        register,
        openDrawer,
      };
    },
  });
</script>
